home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-12-20 | 1.3 KB | 60 lines | [TEXT/CWIE] |
- ///////////////////////////////////////////////////////////////////////////////
- //
- // This file is a BDIAMOND addition.
- //
-
- #ifndef __CError_h__
- #define __CError_h__
-
- class CErrorControl;
-
- /////////////////////////////////////////////////////////////////////////////
- //
- // constants
- //
-
- typedef long ErrorCode;
-
- // define the ErrorCode baselines for all CError objects
- #define BaseErrorCode 100
- #define BaseErrorCodeTicker 200
- #define BaseErrorCodePopup 300
- #define BaseErrorCodeButton 400
- #define BaseErrorCodeConsole 500
- #define BaseErrorCodeLabel 600
- #define BaseErrorCodeGradient 700
- #define BaseErrorCodePopupWindow 800
-
- // define the generic errors
- #define FAILED_ASSERTION_ERROR (BaseErrorCode + 1)
-
- /////////////////////////////////////////////////////////////////////////////
- //
- // utility macros
- //
-
- #define ISERROR(x,y) ((x) == (y))
-
- #define VOLATILE
-
- /////////////////////////////////////////////////////////////////////////////
- //
- // CError class definition
- //
-
- class CError
- {
- public:
- CError(ErrorCode error);
- CError(ErrorCode error, CErrorControl * control);
-
- virtual void Init(ErrorCode error, CErrorControl * control = NULL);
- virtual void HandleError(void);
-
- protected:
- ErrorCode mErrorCode;
- CErrorControl * mControl;
- };
-
- #endif // __CError_h__
-